// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.ast.SQLName_ptr;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.util.ArrayList;
// import java.util.List;

#include "SQLAlterTableGroupStatement.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../SQLName.h"

SQLAlterTableGroupStatement::SQLAlterTableGroupStatement()
{
  options = std::make_shared<std::list<SQLAssignItem_ptr>>();
}

SQLAlterTableGroupStatement::SQLAlterTableGroupStatement(DbType_ptr dbType)
{
  this->setDbType(dbType);
}

SQLName_ptr SQLAlterTableGroupStatement::getName()
{
  return name;
}

void SQLAlterTableGroupStatement::setName(SQLName_ptr name)
{
  if (name != nullptr)
  {
    name->setParent(SharedObject(SQLAlterTableGroupStatement));
  }
  this->name = name;
}

// @Override
void SQLAlterTableGroupStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLAlterTableGroupStatement)))
  {
    acceptChild(visitor, name);
  }
  visitor->endVisit(SharedObject(SQLAlterTableGroupStatement));
}

SQLAssignItem_list_ptr SQLAlterTableGroupStatement::getOptions()
{
  return options;
}
